Repository navigation
Add window services: persisted placement, menus, tray and window options on every engine (#764) - #797
Merged
Merged
Conversation
ambroise-leclerc
commented
Dec 6, 2026
ambroise-leclerc
commented
Dec 6, 2026
ambroise-leclerc
commented
Dec 6, 2026
… when no key arrives (#764)
ambroise-leclerc
commented
Dec 6, 2026
ambroise-leclerc
commented
Dec 6, 2026
ambroise-leclerc
commented
Dec 6, 2026
ambroise-leclerc
commented
Dec 6, 2026
ambroise-leclerc
commented
Dec 6, 2026
ambroise-leclerc
commented
Dec 6, 2026
Geometry, state and activation calls reached the window after the service was disposed; they now go through the same live check as the menu, tray and context menu calls.
…under X11 screens() returned the whole X screen as one rectangle, so a position in the gap between two monitors, or in the unused corner of the bounding box, was accepted. It now lists the GdkMonitor geometries in the pixels a position is given in, and falls back to the X screen only when GDK lists none. The other engines already test against per-monitor work areas (EnumDisplayMonitors, NSScreen, CefDisplay).
…ft by an exception The delegate kept a raw pointer to the stack control past the end of the function if an exception escaped before the normal clean-up; a guard now releases the control and clears the pointer on every exit.
ambroise-leclerc
commented
Dec 6, 2026
…tion as unsupported on Wayland The loss window of a window moved then maximized before two samples agree shrinks from 500 ms to about 200 ms and is documented; the kept position is always an earlier normal one. CEF positionable() no longer trusts cef_get_xdisplay() in a Wayland session, where XWayland is reachable but Chromium cannot place its windows.
ambroise-leclerc
commented
Dec 6, 2026
ambroise-leclerc
commented
Dec 6, 2026
…2, WKWebView) The new tray icon and menu, and the new menu bar, are built and checked before the old ones are taken away; the tray is replaced in place with NIM_MODIFY. WebKitGTK has no tray and its setMenu has no refusal after validation; CEF has no native menu.
setMenu and setTray carry a generation number that C++ returns with every selection. The page keeps a handler per generation (pending, installed or gone): a selection reaches the menu it was made in, a refused call forgets only itself, an accepted one supersedes the older generations. Specs cover pending B while A is active, B refused, B accepted then a late A event, and an older call answered after a newer one.
AM-L
approved these changes
Dec 6, 2026
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #764. Completes the work started in #788. Stacked on #796.
What changes
app.windowControl()andWindowOptions::rememberAs,alwaysOnTop,stateDirectory: geometry and states with per-application persistence, application and context menus with shortcuts, tray, under WebKitGTK, WKWebView, WebView2 and CEF;unsupportedwhere the toolkit cannot.webfront::services::Window, which answers the embedded view only, andwindowService()in@webfront/services. Menu and tray calls carry a generation so a selection reaches the menu that produced it.docs/FRONTENDS.md, ADR-020 and ADR-007 amendments (proposed), changelog.Limits
activate("context")is unsupported on WKWebView and WebView2. Secondary windows are neither controlled nor remembered. Global shortcuts are not delivered.Checks
Desktop jobs (Linux, Windows with
/analyze, macOS) and the CEF GCC/Clang and sanitizer jobs, dispatched on the branch, are green. Seven Codex review passes; every finding fixed or answered.